The command "grep" searches its input for lines containing the string specified by "keyword." Any lines containing a match are reported on the standard output. If one or more file names are supplied as arguments, the dataforks of the files will be opened and their contents used as input. If no file names are supplied, "grep" will read from its standard input. If more than one file name is supplied, "grep" will also report the name of the file in which the match occurred
OPTIONS
The behavior of "grep" can be altered through the use of the following options:
-i Grep will ignore case in performing its search if this option is used.
-v Grep will report lines in which a match is NOT found instead of the lines in which a match IS found if the option -v is given.
WILDCARD CHARACTER
One or more asterisks (*) may be used as wildcard characters in the keyword. The asterisk will match any string of characters (including the null string). If asterisks are used in the keyword, the keyword should be enclosed in double quotes to hide them from MacShell's file name substitution mechanism.
RESTRICTIONS
Files created by some Macintosh applications consist of very long lines, and may contain binary data interspersed with text. The utilities "seg" and "xn" have been provided to partially combat content searching problems which may arise from these facts.